package com.woniuxy.mqconsumer.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

public interface OrderMapper {
    //判断 此订单编号的  未支付状态是否存在
    @Select("select count(*) from t_order where orderNum = #{value} and state = 0")
    long selectOrderCountByOrderNum(String orderNum);

    @Update("update t_order set state = 2 where orderNum = #{value}")
    int updateOrderStateByOrderNum(String orderNum);

    int updateBookStoreCountById(int bookid,int buyCount);
}
